<template>
  <div class="certification">
   <header-bar :text="title" :left="left"></header-bar>
   <div  v-if="status!=3 && status != 2" class="header-tip">实名后，不可修改</div>
   <!-- status!=3 && status != 2 -->
	<div v-if="status!=3 && status != 2" style="    padding: 0 12px; background: #fff;padding-bottom:72px;">
		
	<div class="certContent">
		<div>
		<h3>姓名</h3>
		<input type="text" v-model="username" placeholder="请填写姓名">
		</div>
		<div>
		<h3>身份证号码</h3>
		<input type="text" v-model="userid" placeholder="请填写身份证号码">
		</div>
	</div>
	<div class="detail_xy">
		<input type="checkbox" id="check" v-model="checkbox" /> 购买者表示同意<router-link to="/entrust">《委托管理协议》</router-link>  
		<label for="check"></label>
	</div>
</div> 
<div class="certBtnbg"  v-if="status!=3 && status != 2">
    <button :class="{certBtn:username&&userid&&checkbox}" @click="postAuthentication(username&&userid&&checkbox)">下一步</button>
</div>
<div v-if="status==2" style="background:#fff;height:50px;text-align:center;line-height:50px;font-weight:500;">
	身份已认证
</div>
<div v-if="status==3" style="background:#fff;height:50px;text-align:center;line-height:50px;font-weight:500;">
	身份正在审核中
</div>
  </div>
</template>
<script>
import qs from "qs";
import headerBar from "./main/header";
import { Header, Toast } from "mint-ui";
import { mapState, mapGetters, mapMutations, mapActions } from "vuex";
import Exif from "exif-js";
export default {
  name: "Certification",
  data() {
    return {
      msg: "",
      username: "",
      userid: "",
      status: "",
      title: "身份认证",
      left: {
        status: true
	  },
	  checkbox:false
    };
  },
  components: {
    headerBar
  },
  methods: {
    back() {
      this.$router.go(-1);
    },
    postAuthentication(g) {
      if (g) {
		  this.$router.push({
			path: "/certification1",
			query:{
				username:this.username,
				userid:this.userid
			}
		});
      }
    },
  },
  mounted() {
    // this.status = this.pageInfo.userinfo.status;
    this.status = 1 || this.pageInfo.userinfo.status;
  },
  computed: {
    ...mapState(["pageInfo"])
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
@import url("../../static/css/certification.css");
</style>
